#ifndef TESTMYSTREAM_H
#define TESTMYSTREAM_H
#include <QThread>
#include "MyStream.h"
#include <QtWidgets/QMainWindow>
#include "ui_testmystream.h"
#include <QWaitCondition>

class Worker :public QThread
{
	Q_OBJECT
public:
	Worker(QObject* parent = 0);
	~Worker();

	void StartThread();
	void StopThread();

protected:
	virtual void run() Q_DECL_OVERRIDE;

public slots:
	void SlotPushFirstStack();
	void SlotPushSecondStack();
	void SlotPushThirdStack();
	void SlotLoopFirst();
	void SlotLoopSecond();
	void SlotLoopThird();
	void SlotPopStack();
	void SlotClear();

private:
	bool m_bStop;
	MyStream m_myStream;
	MyStack m_myStack;

};

class TestMyStream : public QMainWindow
{
	Q_OBJECT

public:
	TestMyStream(QWidget *parent = 0);
	~TestMyStream();

private:
	Ui::TestMyStreamClass ui;
	Worker m_worker;
};

#endif // TESTMYSTREAM_H
